/*
 * ===========================================================================
 *       Filename:  qfmode.h
 *        Version:  1.0
 *        Created:  06/12/11 15:20:51
 *         Author:  LYF (Liu Yunfeng), liuyf.nju@gmail.com
 * ===========================================================================
 */


/* port of qf4a512 
 * spi bus
 */
#define  P_CS	0
#define  P_RST	1
#define  P_DI	2
#define  P_CLK	3
#define  P_INT	4
#define  P_DO	5

void qf_port_init(void);
int  qf_reg_isreadonly(unsigned short);
void qf_reset(void);
void qf_configure_read(unsigned short address, unsigned char *value);
void qf_configure_write(unsigned short address, unsigned char value);
void qf_run_mode(unsigned char ctrl_addr, unsigned char ctrl_data, 
		unsigned char *data_flag, unsigned short *data);


